package org.feiye.studyday04.practise;

public class Math {

	public static void main(String[] args) {
		// 算1-500内所有数的和
		int sum = 0;
		for (int i = 1; i <= 500; i++) {
			sum += i;
		}
		System.out.println("1-500内所有数的和是:" + sum);
	}

}
